#include<bits/stdc++.h>

using namespace std;
const int n = 4;

int main() {
    int a[n];

    for (int i = 0; i < n; i++)cin >> a[i];

    for (int i = n - 2; i >= 0; i--)
        for (int j = 0; j <= i; j++)
            if (a[j] > a[j + 1]) {
                swap(a[j], a[j + 1]);
            }


    for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
    }
    cout << endl;

    return 0;
}
